#!/usr/bin/env python
# encoding: utf-8

import os
from  openpyxl import  Workbook
from openpyxl  import load_workbook
wb = load_workbook('%s/doc/test.xlsx'%os.getcwd())
for sheet_name in wb.get_sheet_names():
    sheet = wb[sheet_name]
    # print(sheet)
    sheet.cell(row=27, column=4).value = 1230
    # for rownum in range(29, 38):
        # oldstr = sheet.cell(row=rownum, column=5).value
        # if oldstr:
            # # 根据需要截取原单元格里面的内容与需要添加的内容进行拼接
            # # 往单元格中写入拼接后的新字符串内容
            # sheet.cell(row=rownum, column=80).value = 123
        # else:
            # pass


wb.save('%s/doc/test_new.xlsx'%os.getcwd())
